//
//  AppDelegate.m
//  WRRouter
//
//  Created by wangrui on 2017/3/18.
//  Copyright © 2017年 wangrui. All rights reserved.
//

#import "AppDelegate.h"
#import "URLList.h"
#import "ViewController.h"

@interface AppDelegate ()
@property (nonatomic, strong) URLList* urlList;
@end

@implementation AppDelegate

- (void)beforeLaunch
{
    [self registerURLList];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [self beforeLaunch];
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    ViewController* vc = [ViewController new];
    vc.title = @"WRRouter";
    UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:vc];
    self.window.rootViewController = nav;
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)registerURLList
{
    self.urlList = [URLList new];
    [self.urlList registerURL];
}

@end
